<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8" />

        <title>职位管理</title>

        <link href="../../css/mine.css" type="text/css" rel="stylesheet" />
    </head>
    <body>
        <style>
            .tr_color{background-color: #9F88FF}
        </style>
        <div class="div_head">
            <span>
                <span style="float: left;">当前位置是：系统管理-》职位设置</span>
                <span style="float: right; margin-right: 8px; font-weight: bold;">
                    <a style="text-decoration: none;" href="/position/add-ui">【添加】</a>
					<a style="text-decoration: none;" href="#">【删除】</a>
                </span>
            </span>
        </div>
        <div></div>
        <div class="div_search">
            <span>
                <form action="/position/list" method="get">
                    职位名称: 
					<input type="text" name="roleName" value="${roleName}"  />
					 所属部门: 
					<input type="text" name="deptName" value="${deptName}"  />
					是否启用: 
					<select name="roleStatus">
						<option value="-1">---请选择---</option>
						<option <c:if test="${roleStatus==0}">selected</c:if> value="0" >是</option>
						<option <c:if test="${roleStatus==1}">selected</c:if> value="1">否</option>
					</select>
                    <input value="查询" type="submit" />
					
                </form>
            </span>
        </div>
        <div style="font-size: 13px; margin: 10px 5px;">
            <table class="table_a" border="1" width="100%">
                <tbody><tr style="font-weight: bold;">
                        <td width="40px;">序号</td>
                        <td width="30px;"><input type="checkbox" /></td>						
                        <td width="80px;"> 职位编码</td>
                        <td >职位名称</td>
						<td width="100px;">职位分类</td>
                        <td width="120px;">所属部门</td>                       
						<td width="120px;">状态</td>  
                        <td align="center" width="100px;">操作</td>
                    </tr>
                    <c:forEach var="p" items="${pageInfo.list}" >
                    <tr id="product1">
                        <td>${p.roleId}</td>
                        <td><input type="checkbox" /></td>
						<td>${p.roleNum}</td>
                        <td><a href="view.jsp">${p.roleName}</a></td>
						<td>${p.classifyName}</td>
                        <td>${p.deptName}</td>
						<td>
                            <c:if test="${p.roleStatus==0}">是</c:if>
                            <c:if test="${p.roleStatus==1}">否</c:if>
                        </td>
                        <td>
							<a href="add.jsp">修改</a>
							<a href="#">删除</a>
						</td>                        
                    </tr>
                    </c:forEach>
                <tr>
                    <td colspan="20" style="text-align: center;">
                        <a style="text-decoration: none;" href="${pageContext.request.contextPath}/position/list?postName=${roleName}&deptName=${deptName}&postStatus=${roleStatus}">首页 </a>
                        <a style="text-decoration: none;" href="${pageContext.request.contextPath}/position/list?pageNum=${pageInfo.prePage<1?1:pageInfo.prePage}&postName=${roleName}&deptName=${deptName}&postStatus=${roleStatus}">上一页 </a>
                        <c:forEach var="i" begin="1" end="${pageInfo.pages}">
                            <a style="text-decoration: none;" href="${pageContext.request.contextPath}/position/list?pageNum=${i}&postName=${roleName}&deptName=${deptName}&postStatus=${roleStatus}">${i}</a>
                        </c:forEach>
                        <a style="text-decoration: none;" href="${pageContext.request.contextPath}/position/list?pageNum=${pageInfo.nextPage==0 ? pageInfo.pages : pageInfo.nextPage}&postName=${roleName}&deptName=${deptName}&postStatus=${roleStatus}">下一页 </a>
                        <a style="text-decoration: none;" href="${pageContext.request.contextPath}/position/list?pageNum=${pageInfo.pages}&postName=${roleName}&deptName=${deptName}&postStatus=${roleStatus}"> 尾页 </a>
                        共${pageInfo.pages}页 每页显示${pageInfo.size}/共${pageInfo.total}条
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </body>
</html>